package com.jie.langlangmall.portal.controller;

import com.jie.langlangmall.common.api.CommonResult;
import com.jie.langlangmall.model.OmsOrderItem;
import com.jie.langlangmall.portal.service.OmsOrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jie
 * @version 1.0 2024-12-05
 */
@RestController
@RequestMapping("/order/item")
public class OmsOrderItemController {

    @Autowired
    private OmsOrderItemService orderItemService;

    @GetMapping("/{id}")
    public CommonResult<OmsOrderItem> get(@PathVariable("id") Long id) {
        return CommonResult.success(orderItemService.get(id));
    }
}
